﻿package mortal.game.view.vip
{
    import Message.DB.Tables.*;
    import Message.Public.*;
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class VipIcon extends ActionToolTipIcon
    {
        private static var _instance:VipIcon;

        public function VipIcon()
        {
            super(ResFileConst.VipIcon);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = VipConfig.instance.getVipConfigByType(EVipRecordType._EVipRecordType3DDesc);
            this.toolTipData = _loc_1;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.VipWinOpen));
            return;
        }// end function

        public static function get instance() : VipIcon
        {
            if (!_instance)
            {
                _instance = new VipIcon;
            }
            return _instance;
        }// end function

        public static function get isViewShow() : Boolean
        {
            return _instance && !_instance.isHide;
        }// end function

    }
}
